package mips;

public class Test {

	public static void writeCode() {
		
		// 7 instructions
		// 80000000
		// addiu $4, $0, 16
		// 00100100000001000000000000010000
		n64.MemoryManager.RDRAM[0] = 0x24040020; 
			//0x24040010;
		// 80000004
		// lui $sp, A040 // $sp<->29
		// 001111 00000 11101 1000000001010000
		n64.MemoryManager.RDRAM[1] = 0x3C1DA040;

		// 8000008
		// subu sp sp 32 == addiu sp sp -32
		// 00100111101111011111111111100000
		n64.MemoryManager.RDRAM[2] = 0x27BDFFE0;
		
		// 8000000C
		// sw ra 20(sp)
		// 10101111101111110000000000010100
		n64.MemoryManager.RDRAM[3] = 0xAFBF0014;
		
		// 8000010
		// sw fp 16(sp)
		// 10101111101111100000000000010000
		n64.MemoryManager.RDRAM[4] = 0xAFBE0010;
		
		// 80000014
		// addiu fp sp 28
		// 00100111101111100000000000011100
		n64.MemoryManager.RDRAM[5] = 0x27BE001C;
		
		
		// 80000018
		// lui $fp, 8060 // $fp<->30
		// 00111100000111101000000001100000
		//n64.MemoryManager.RDRAM[6] = 0x3C1E8060;
		
		// nop ??
		n64.MemoryManager.RDRAM[6] = 0x00000020;
		
		// 8000001C
		// jal 80000040
		// 00001100000000000000000001000000
		n64.MemoryManager.RDRAM[7] = 0x0C000040;
		
		// 80000020
		// nop
		n64.MemoryManager.RDRAM[8] = 0x00000020;

		// lw ra 20(sp)
		// lw fp 16(sp)
		// addiu sp sp 32
		// jr ra
		
		// 80000024
		// j 80000024
		// 00001000000000000000000000100100
		n64.MemoryManager.RDRAM[9] = 0x08000024;
		
		// 80000028
		// nop
		n64.MemoryManager.RDRAM[10] = 0x00000020;

		// 8000002C
		// nop
		n64.MemoryManager.RDRAM[11] = 0x00000020;
		
		// 80000030
		// nop
		n64.MemoryManager.RDRAM[12] = 0x00000020;
		
		// 80000034
		// nop
		n64.MemoryManager.RDRAM[13] = 0x00000020;
		
		n64.MemoryManager.RDRAM[16] = 0x27bdffe8;
		n64.MemoryManager.RDRAM[17] = 0xafbe0010;
		n64.MemoryManager.RDRAM[18] = 0x03a0f020;
		n64.MemoryManager.RDRAM[19] = 0x24400020;
		n64.MemoryManager.RDRAM[20] = 0xafc20008;
		n64.MemoryManager.RDRAM[21] = 0xafc00000;
		n64.MemoryManager.RDRAM[22] = 0xafc00004;
		n64.MemoryManager.RDRAM[23] = 0x08000026;
		n64.MemoryManager.RDRAM[24] = 0x00000020;
		n64.MemoryManager.RDRAM[25] = 0x8fc30008;
		n64.MemoryManager.RDRAM[26] = 0x8fc20004;
		n64.MemoryManager.RDRAM[27] = 0x00000020;
		n64.MemoryManager.RDRAM[28] = 0x00620018;
		n64.MemoryManager.RDRAM[29] = 0x00001812;
		n64.MemoryManager.RDRAM[30] = 0x8fc20000;
		n64.MemoryManager.RDRAM[31] = 0x00000020;
		n64.MemoryManager.RDRAM[32] = 0x00431021;
		n64.MemoryManager.RDRAM[33] = 0xafc20000;
		n64.MemoryManager.RDRAM[34] = 0x8fc20004;
		n64.MemoryManager.RDRAM[35] = 0x00000020;
		n64.MemoryManager.RDRAM[36] = 0x24420001;
		n64.MemoryManager.RDRAM[37] = 0xafc20004;
		n64.MemoryManager.RDRAM[38] = 0x8fc20004;
		n64.MemoryManager.RDRAM[39] = 0x8fc30008;
		n64.MemoryManager.RDRAM[40] = 0x00000020;
		n64.MemoryManager.RDRAM[41] = 0x0043102a;
		n64.MemoryManager.RDRAM[42] = 0x1440ffee;
		n64.MemoryManager.RDRAM[43] = 0x00000020;
		n64.MemoryManager.RDRAM[44] = 0x8fc20000;
		n64.MemoryManager.RDRAM[45] = 0x03c0e820;
		n64.MemoryManager.RDRAM[46] = 0x8fbe0010;
		n64.MemoryManager.RDRAM[47] = 0x27bd0018;
		n64.MemoryManager.RDRAM[48] = 0x03e00008;
		n64.MemoryManager.RDRAM[49] = 0x00000020;
	}
}
